Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable LLVM 16.0.3 #4411

Merged
merged 10 commits into from
Aug 16, 2023
Merged

Enable LLVM 16.0.3 #4411

merged 10 commits into from
Aug 16, 2023

Conversation

ikeycode
Copy link
Contributor

Each commit in the series explains the rationale behind each decision, but nothing scary really.

The main issue area I have is getting the CI itself to bend to my will, so I could need some help here?

  • gdb is being janky for the DMD tests (complains about .x - I saw before a nonjanky gdb was forced?
  • Can't make it "see" FileCheck which breaks the lit tests

Note: due to llvm<16 forcing C++-11 we have to use conditional compilation, otherwise we're trying to
use C++-17 features ..

@ikeycode
Copy link
Contributor Author

Note, 16.0.4 came out after I started this work, but I will update Serpent OS to use latest release and test again there.

sudo apt-get install gdb=9.1-0ubuntu1 llvm
version='${{ matrix.llvm_version }}'
if [[ "$version" =~ ^1[6-9]\. ]]; then # LLVM 16.0.3+
sudo apt-get install gdb llvm llvm-14-tools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than adding llvm-14-tools, you should copy llvm16's filecheck.cpp to ldc's utils folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

@ikeycode
Copy link
Contributor Author

ikeycode commented Jun 2, 2023

Sorry for letting this go stale! Will get back on to it asap!

ikeycode added 10 commits June 3, 2023 22:05
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
In stable LLVM 16 this is now under `Support` and not `IR`

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
The StandardInstrumentations type now takes an LLVMContext parameter
so pass it along from the current module.

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
Instructions now use friend APIs to add themselves into a
BasicBlock, rather than a BasicBlock having an API to add
the instructions.

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
This was killed upstream in the codegen pipeline as part of a bunch of
legacy PM removals:

 - https://reviews.llvm.org/D137116

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
This isn't *the* most ideal approach and in future we may want
to select specific fallbacks other than "generic".

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
Unfortunately when building with LLVM < 15, we're using C++-11,
so the std::optional bits are only available in C++-17.

Even more unfortunately we can't really override this, rather
inherit the fact of using C++-17 when using LLVM > 16.

Thus, we add a slightly messy conditional compilation situation
to allow usage of LDC on older LLVM versions, and with newer
LLVM/libcxx.

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
Modified to have an explicit `main()` per the other profdata
imports in this tree.

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
@ikeycode
Copy link
Contributor Author

ikeycode commented Jun 3, 2023

Rebased. I wanted to leave the CI run so you could see the logs. I'm seeing a bunch of errors, chiefly:

.profdata file not found issues. Perhaps something wrong with the new llvm-profdata? Will investigate
gdb is broken for any dmd/lit tests using it
dcompute seems broken in terms of want LLVM itself wants?

@ikeycode
Copy link
Contributor Author

ikeycode commented Jun 3, 2023

I just checked, 15 + 16 different significantly re llvm-profdata. Additionally I see a test plugin failure that I need to fix

@kinke
Copy link
Member

kinke commented Aug 16, 2023

Thanks Ikey for starting this!

@ikeycode
Copy link
Contributor Author

Glad this is in now! Sorry I couldn't do much more on it, kinda hit my domain knowledge with this one :D

@kinke
Copy link
Member

kinke commented Aug 16, 2023

Yeah, a bit unlucky with that problematic v16 bump - your work would have sufficed for most other LLVM bumps (excl. v15, but that's an entirely different topic). We'll see pretty soon how v17 goes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants